\(\int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^3 \, dx\) [693]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [C] (verification not implemented)
   Sympy [C] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 41, antiderivative size = 84 \[ \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^3 \, dx=\frac {a^3 B c^3 \sec ^6(e+f x)}{6 f}+\frac {a^3 A c^3 \tan (e+f x)}{f}+\frac {2 a^3 A c^3 \tan ^3(e+f x)}{3 f}+\frac {a^3 A c^3 \tan ^5(e+f x)}{5 f} \]

[Out]

1/6*a^3*B*c^3*sec(f*x+e)^6/f+a^3*A*c^3*tan(f*x+e)/f+2/3*a^3*A*c^3*tan(f*x+e)^3/f+1/5*a^3*A*c^3*tan(f*x+e)^5/f

Rubi [A] (verified)

Time = 0.14 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.098, Rules used = {3669, 74, 655, 200} \[ \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^3 \, dx=\frac {a^3 A c^3 \tan ^5(e+f x)}{5 f}+\frac {2 a^3 A c^3 \tan ^3(e+f x)}{3 f}+\frac {a^3 A c^3 \tan (e+f x)}{f}+\frac {a^3 B c^3 \sec ^6(e+f x)}{6 f} \]

[In]

Int[(a + I*a*Tan[e + f*x])^3*(A + B*Tan[e + f*x])*(c - I*c*Tan[e + f*x])^3,x]

[Out]

(a^3*B*c^3*Sec[e + f*x]^6)/(6*f) + (a^3*A*c^3*Tan[e + f*x])/f + (2*a^3*A*c^3*Tan[e + f*x]^3)/(3*f) + (a^3*A*c^
3*Tan[e + f*x]^5)/(5*f)

Rule 74

Int[((a_) + (b_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[(a*c + b*
d*x^2)^m*(e + f*x)^p, x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && EqQ[b*c + a*d, 0] && EqQ[n, m] && Integer
Q[m] && (NeQ[m, -1] || (EqQ[e, 0] && (EqQ[p, 1] ||  !IntegerQ[p])))

Rule 200

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[ExpandIntegrand[(a + b*x^n)^p, x], x] /; FreeQ[{a, b}, x]
&& IGtQ[n, 0] && IGtQ[p, 0]

Rule 655

Int[((d_) + (e_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[e*((a + c*x^2)^(p + 1)/(2*c*(p + 1))),
x] + Dist[d, Int[(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, p}, x] && NeQ[p, -1]

Rule 3669

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a*(c/f), Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^(n - 1)*(A + B*x), x
], x, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {(a c) \text {Subst}\left (\int (a+i a x)^2 (A+B x) (c-i c x)^2 \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {(a c) \text {Subst}\left (\int (A+B x) \left (a c+a c x^2\right )^2 \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {a^3 B c^3 \sec ^6(e+f x)}{6 f}+\frac {(a A c) \text {Subst}\left (\int \left (a c+a c x^2\right )^2 \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {a^3 B c^3 \sec ^6(e+f x)}{6 f}+\frac {(a A c) \text {Subst}\left (\int \left (a^2 c^2+2 a^2 c^2 x^2+a^2 c^2 x^4\right ) \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {a^3 B c^3 \sec ^6(e+f x)}{6 f}+\frac {a^3 A c^3 \tan (e+f x)}{f}+\frac {2 a^3 A c^3 \tan ^3(e+f x)}{3 f}+\frac {a^3 A c^3 \tan ^5(e+f x)}{5 f} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.28 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.77 \[ \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^3 \, dx=\frac {a^3 B c^3 \sec ^6(e+f x)}{6 f}+\frac {a^3 A c^3 \left (\tan (e+f x)+\frac {2}{3} \tan ^3(e+f x)+\frac {1}{5} \tan ^5(e+f x)\right )}{f} \]

[In]

Integrate[(a + I*a*Tan[e + f*x])^3*(A + B*Tan[e + f*x])*(c - I*c*Tan[e + f*x])^3,x]

[Out]

(a^3*B*c^3*Sec[e + f*x]^6)/(6*f) + (a^3*A*c^3*(Tan[e + f*x] + (2*Tan[e + f*x]^3)/3 + Tan[e + f*x]^5/5))/f

Maple [A] (verified)

Time = 0.12 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.89

method result size
derivativedivides \(\frac {c^{3} a^{3} \left (\frac {B \tan \left (f x +e \right )^{6}}{6}+\frac {A \tan \left (f x +e \right )^{5}}{5}+\frac {B \tan \left (f x +e \right )^{4}}{2}+\frac {2 A \tan \left (f x +e \right )^{3}}{3}+\frac {B \tan \left (f x +e \right )^{2}}{2}+A \tan \left (f x +e \right )\right )}{f}\) \(75\)
default \(\frac {c^{3} a^{3} \left (\frac {B \tan \left (f x +e \right )^{6}}{6}+\frac {A \tan \left (f x +e \right )^{5}}{5}+\frac {B \tan \left (f x +e \right )^{4}}{2}+\frac {2 A \tan \left (f x +e \right )^{3}}{3}+\frac {B \tan \left (f x +e \right )^{2}}{2}+A \tan \left (f x +e \right )\right )}{f}\) \(75\)
risch \(\frac {16 c^{3} a^{3} \left (10 i A \,{\mathrm e}^{6 i \left (f x +e \right )}+10 B \,{\mathrm e}^{6 i \left (f x +e \right )}+15 i A \,{\mathrm e}^{4 i \left (f x +e \right )}+6 i A \,{\mathrm e}^{2 i \left (f x +e \right )}+i A \right )}{15 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{6}}\) \(81\)
parallelrisch \(\frac {5 B \,a^{3} c^{3} \tan \left (f x +e \right )^{6}+6 A \,a^{3} c^{3} \tan \left (f x +e \right )^{5}+15 B \,a^{3} c^{3} \tan \left (f x +e \right )^{4}+20 A \,a^{3} c^{3} \tan \left (f x +e \right )^{3}+15 B \,a^{3} c^{3} \tan \left (f x +e \right )^{2}+30 A \,a^{3} c^{3} \tan \left (f x +e \right )}{30 f}\) \(107\)
norman \(\frac {a^{3} A \,c^{3} \tan \left (f x +e \right )}{f}+\frac {B \,a^{3} c^{3} \tan \left (f x +e \right )^{2}}{2 f}+\frac {B \,a^{3} c^{3} \tan \left (f x +e \right )^{4}}{2 f}+\frac {B \,a^{3} c^{3} \tan \left (f x +e \right )^{6}}{6 f}+\frac {2 a^{3} A \,c^{3} \tan \left (f x +e \right )^{3}}{3 f}+\frac {a^{3} A \,c^{3} \tan \left (f x +e \right )^{5}}{5 f}\) \(119\)
parts \(A \,a^{3} c^{3} x +\frac {A \,a^{3} c^{3} \left (\frac {\tan \left (f x +e \right )^{5}}{5}-\frac {\tan \left (f x +e \right )^{3}}{3}+\tan \left (f x +e \right )-\arctan \left (\tan \left (f x +e \right )\right )\right )}{f}+\frac {B \,a^{3} c^{3} \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f}+\frac {B \,a^{3} c^{3} \left (\frac {\tan \left (f x +e \right )^{6}}{6}-\frac {\tan \left (f x +e \right )^{4}}{4}+\frac {\tan \left (f x +e \right )^{2}}{2}-\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}\right )}{f}+\frac {3 A \,a^{3} c^{3} \left (\tan \left (f x +e \right )-\arctan \left (\tan \left (f x +e \right )\right )\right )}{f}+\frac {3 A \,a^{3} c^{3} \left (\frac {\tan \left (f x +e \right )^{3}}{3}-\tan \left (f x +e \right )+\arctan \left (\tan \left (f x +e \right )\right )\right )}{f}+\frac {3 B \,a^{3} c^{3} \left (\frac {\tan \left (f x +e \right )^{2}}{2}-\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}\right )}{f}+\frac {3 B \,a^{3} c^{3} \left (\frac {\tan \left (f x +e \right )^{4}}{4}-\frac {\tan \left (f x +e \right )^{2}}{2}+\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}\right )}{f}\) \(284\)

[In]

int((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^3,x,method=_RETURNVERBOSE)

[Out]

1/f*c^3*a^3*(1/6*B*tan(f*x+e)^6+1/5*A*tan(f*x+e)^5+1/2*B*tan(f*x+e)^4+2/3*A*tan(f*x+e)^3+1/2*B*tan(f*x+e)^2+A*
tan(f*x+e))

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.25 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.75 \[ \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^3 \, dx=-\frac {16 \, {\left (10 \, {\left (-i \, A - B\right )} a^{3} c^{3} e^{\left (6 i \, f x + 6 i \, e\right )} - 15 i \, A a^{3} c^{3} e^{\left (4 i \, f x + 4 i \, e\right )} - 6 i \, A a^{3} c^{3} e^{\left (2 i \, f x + 2 i \, e\right )} - i \, A a^{3} c^{3}\right )}}{15 \, {\left (f e^{\left (12 i \, f x + 12 i \, e\right )} + 6 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 15 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 20 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 15 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 6 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \]

[In]

integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^3,x, algorithm="fricas")

[Out]

-16/15*(10*(-I*A - B)*a^3*c^3*e^(6*I*f*x + 6*I*e) - 15*I*A*a^3*c^3*e^(4*I*f*x + 4*I*e) - 6*I*A*a^3*c^3*e^(2*I*
f*x + 2*I*e) - I*A*a^3*c^3)/(f*e^(12*I*f*x + 12*I*e) + 6*f*e^(10*I*f*x + 10*I*e) + 15*f*e^(8*I*f*x + 8*I*e) +
20*f*e^(6*I*f*x + 6*I*e) + 15*f*e^(4*I*f*x + 4*I*e) + 6*f*e^(2*I*f*x + 2*I*e) + f)

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.49 (sec) , antiderivative size = 224, normalized size of antiderivative = 2.67 \[ \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^3 \, dx=\frac {240 i A a^{3} c^{3} e^{4 i e} e^{4 i f x} + 96 i A a^{3} c^{3} e^{2 i e} e^{2 i f x} + 16 i A a^{3} c^{3} + \left (160 i A a^{3} c^{3} e^{6 i e} + 160 B a^{3} c^{3} e^{6 i e}\right ) e^{6 i f x}}{15 f e^{12 i e} e^{12 i f x} + 90 f e^{10 i e} e^{10 i f x} + 225 f e^{8 i e} e^{8 i f x} + 300 f e^{6 i e} e^{6 i f x} + 225 f e^{4 i e} e^{4 i f x} + 90 f e^{2 i e} e^{2 i f x} + 15 f} \]

[In]

integrate((a+I*a*tan(f*x+e))**3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))**3,x)

[Out]

(240*I*A*a**3*c**3*exp(4*I*e)*exp(4*I*f*x) + 96*I*A*a**3*c**3*exp(2*I*e)*exp(2*I*f*x) + 16*I*A*a**3*c**3 + (16
0*I*A*a**3*c**3*exp(6*I*e) + 160*B*a**3*c**3*exp(6*I*e))*exp(6*I*f*x))/(15*f*exp(12*I*e)*exp(12*I*f*x) + 90*f*
exp(10*I*e)*exp(10*I*f*x) + 225*f*exp(8*I*e)*exp(8*I*f*x) + 300*f*exp(6*I*e)*exp(6*I*f*x) + 225*f*exp(4*I*e)*e
xp(4*I*f*x) + 90*f*exp(2*I*e)*exp(2*I*f*x) + 15*f)

Maxima [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.26 \[ \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^3 \, dx=\frac {5 \, B a^{3} c^{3} \tan \left (f x + e\right )^{6} + 6 \, A a^{3} c^{3} \tan \left (f x + e\right )^{5} + 15 \, B a^{3} c^{3} \tan \left (f x + e\right )^{4} + 20 \, A a^{3} c^{3} \tan \left (f x + e\right )^{3} + 15 \, B a^{3} c^{3} \tan \left (f x + e\right )^{2} + 30 \, A a^{3} c^{3} \tan \left (f x + e\right )}{30 \, f} \]

[In]

integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^3,x, algorithm="maxima")

[Out]

1/30*(5*B*a^3*c^3*tan(f*x + e)^6 + 6*A*a^3*c^3*tan(f*x + e)^5 + 15*B*a^3*c^3*tan(f*x + e)^4 + 20*A*a^3*c^3*tan
(f*x + e)^3 + 15*B*a^3*c^3*tan(f*x + e)^2 + 30*A*a^3*c^3*tan(f*x + e))/f

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 754 vs. \(2 (78) = 156\).

Time = 0.90 (sec) , antiderivative size = 754, normalized size of antiderivative = 8.98 \[ \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^3 \, dx=\frac {5 \, B a^{3} c^{3} \tan \left (f x\right )^{6} \tan \left (e\right )^{6} - 30 \, A a^{3} c^{3} \tan \left (f x\right )^{6} \tan \left (e\right )^{5} - 30 \, A a^{3} c^{3} \tan \left (f x\right )^{5} \tan \left (e\right )^{6} + 15 \, B a^{3} c^{3} \tan \left (f x\right )^{6} \tan \left (e\right )^{4} + 15 \, B a^{3} c^{3} \tan \left (f x\right )^{4} \tan \left (e\right )^{6} - 20 \, A a^{3} c^{3} \tan \left (f x\right )^{6} \tan \left (e\right )^{3} + 90 \, A a^{3} c^{3} \tan \left (f x\right )^{5} \tan \left (e\right )^{4} + 90 \, A a^{3} c^{3} \tan \left (f x\right )^{4} \tan \left (e\right )^{5} - 20 \, A a^{3} c^{3} \tan \left (f x\right )^{3} \tan \left (e\right )^{6} + 15 \, B a^{3} c^{3} \tan \left (f x\right )^{6} \tan \left (e\right )^{2} + 45 \, B a^{3} c^{3} \tan \left (f x\right )^{4} \tan \left (e\right )^{4} + 15 \, B a^{3} c^{3} \tan \left (f x\right )^{2} \tan \left (e\right )^{6} - 6 \, A a^{3} c^{3} \tan \left (f x\right )^{6} \tan \left (e\right ) + 30 \, A a^{3} c^{3} \tan \left (f x\right )^{5} \tan \left (e\right )^{2} - 180 \, A a^{3} c^{3} \tan \left (f x\right )^{4} \tan \left (e\right )^{3} - 180 \, A a^{3} c^{3} \tan \left (f x\right )^{3} \tan \left (e\right )^{4} + 30 \, A a^{3} c^{3} \tan \left (f x\right )^{2} \tan \left (e\right )^{5} - 6 \, A a^{3} c^{3} \tan \left (f x\right ) \tan \left (e\right )^{6} + 5 \, B a^{3} c^{3} \tan \left (f x\right )^{6} + 45 \, B a^{3} c^{3} \tan \left (f x\right )^{4} \tan \left (e\right )^{2} + 45 \, B a^{3} c^{3} \tan \left (f x\right )^{2} \tan \left (e\right )^{4} + 5 \, B a^{3} c^{3} \tan \left (e\right )^{6} + 6 \, A a^{3} c^{3} \tan \left (f x\right )^{5} - 30 \, A a^{3} c^{3} \tan \left (f x\right )^{4} \tan \left (e\right ) + 180 \, A a^{3} c^{3} \tan \left (f x\right )^{3} \tan \left (e\right )^{2} + 180 \, A a^{3} c^{3} \tan \left (f x\right )^{2} \tan \left (e\right )^{3} - 30 \, A a^{3} c^{3} \tan \left (f x\right ) \tan \left (e\right )^{4} + 6 \, A a^{3} c^{3} \tan \left (e\right )^{5} + 15 \, B a^{3} c^{3} \tan \left (f x\right )^{4} + 45 \, B a^{3} c^{3} \tan \left (f x\right )^{2} \tan \left (e\right )^{2} + 15 \, B a^{3} c^{3} \tan \left (e\right )^{4} + 20 \, A a^{3} c^{3} \tan \left (f x\right )^{3} - 90 \, A a^{3} c^{3} \tan \left (f x\right )^{2} \tan \left (e\right ) - 90 \, A a^{3} c^{3} \tan \left (f x\right ) \tan \left (e\right )^{2} + 20 \, A a^{3} c^{3} \tan \left (e\right )^{3} + 15 \, B a^{3} c^{3} \tan \left (f x\right )^{2} + 15 \, B a^{3} c^{3} \tan \left (e\right )^{2} + 30 \, A a^{3} c^{3} \tan \left (f x\right ) + 30 \, A a^{3} c^{3} \tan \left (e\right ) + 5 \, B a^{3} c^{3}}{30 \, {\left (f \tan \left (f x\right )^{6} \tan \left (e\right )^{6} - 6 \, f \tan \left (f x\right )^{5} \tan \left (e\right )^{5} + 15 \, f \tan \left (f x\right )^{4} \tan \left (e\right )^{4} - 20 \, f \tan \left (f x\right )^{3} \tan \left (e\right )^{3} + 15 \, f \tan \left (f x\right )^{2} \tan \left (e\right )^{2} - 6 \, f \tan \left (f x\right ) \tan \left (e\right ) + f\right )}} \]

[In]

integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^3,x, algorithm="giac")

[Out]

1/30*(5*B*a^3*c^3*tan(f*x)^6*tan(e)^6 - 30*A*a^3*c^3*tan(f*x)^6*tan(e)^5 - 30*A*a^3*c^3*tan(f*x)^5*tan(e)^6 +
15*B*a^3*c^3*tan(f*x)^6*tan(e)^4 + 15*B*a^3*c^3*tan(f*x)^4*tan(e)^6 - 20*A*a^3*c^3*tan(f*x)^6*tan(e)^3 + 90*A*
a^3*c^3*tan(f*x)^5*tan(e)^4 + 90*A*a^3*c^3*tan(f*x)^4*tan(e)^5 - 20*A*a^3*c^3*tan(f*x)^3*tan(e)^6 + 15*B*a^3*c
^3*tan(f*x)^6*tan(e)^2 + 45*B*a^3*c^3*tan(f*x)^4*tan(e)^4 + 15*B*a^3*c^3*tan(f*x)^2*tan(e)^6 - 6*A*a^3*c^3*tan
(f*x)^6*tan(e) + 30*A*a^3*c^3*tan(f*x)^5*tan(e)^2 - 180*A*a^3*c^3*tan(f*x)^4*tan(e)^3 - 180*A*a^3*c^3*tan(f*x)
^3*tan(e)^4 + 30*A*a^3*c^3*tan(f*x)^2*tan(e)^5 - 6*A*a^3*c^3*tan(f*x)*tan(e)^6 + 5*B*a^3*c^3*tan(f*x)^6 + 45*B
*a^3*c^3*tan(f*x)^4*tan(e)^2 + 45*B*a^3*c^3*tan(f*x)^2*tan(e)^4 + 5*B*a^3*c^3*tan(e)^6 + 6*A*a^3*c^3*tan(f*x)^
5 - 30*A*a^3*c^3*tan(f*x)^4*tan(e) + 180*A*a^3*c^3*tan(f*x)^3*tan(e)^2 + 180*A*a^3*c^3*tan(f*x)^2*tan(e)^3 - 3
0*A*a^3*c^3*tan(f*x)*tan(e)^4 + 6*A*a^3*c^3*tan(e)^5 + 15*B*a^3*c^3*tan(f*x)^4 + 45*B*a^3*c^3*tan(f*x)^2*tan(e
)^2 + 15*B*a^3*c^3*tan(e)^4 + 20*A*a^3*c^3*tan(f*x)^3 - 90*A*a^3*c^3*tan(f*x)^2*tan(e) - 90*A*a^3*c^3*tan(f*x)
*tan(e)^2 + 20*A*a^3*c^3*tan(e)^3 + 15*B*a^3*c^3*tan(f*x)^2 + 15*B*a^3*c^3*tan(e)^2 + 30*A*a^3*c^3*tan(f*x) +
30*A*a^3*c^3*tan(e) + 5*B*a^3*c^3)/(f*tan(f*x)^6*tan(e)^6 - 6*f*tan(f*x)^5*tan(e)^5 + 15*f*tan(f*x)^4*tan(e)^4
 - 20*f*tan(f*x)^3*tan(e)^3 + 15*f*tan(f*x)^2*tan(e)^2 - 6*f*tan(f*x)*tan(e) + f)

Mupad [B] (verification not implemented)

Time = 8.33 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.43 \[ \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^3 \, dx=\frac {a^3\,c^3\,\sin \left (e+f\,x\right )\,\left (30\,A\,{\cos \left (e+f\,x\right )}^5+15\,B\,{\cos \left (e+f\,x\right )}^4\,\sin \left (e+f\,x\right )+20\,A\,{\cos \left (e+f\,x\right )}^3\,{\sin \left (e+f\,x\right )}^2+15\,B\,{\cos \left (e+f\,x\right )}^2\,{\sin \left (e+f\,x\right )}^3+6\,A\,\cos \left (e+f\,x\right )\,{\sin \left (e+f\,x\right )}^4+5\,B\,{\sin \left (e+f\,x\right )}^5\right )}{30\,f\,{\cos \left (e+f\,x\right )}^6} \]

[In]

int((A + B*tan(e + f*x))*(a + a*tan(e + f*x)*1i)^3*(c - c*tan(e + f*x)*1i)^3,x)

[Out]

(a^3*c^3*sin(e + f*x)*(30*A*cos(e + f*x)^5 + 5*B*sin(e + f*x)^5 + 20*A*cos(e + f*x)^3*sin(e + f*x)^2 + 15*B*co
s(e + f*x)^2*sin(e + f*x)^3 + 6*A*cos(e + f*x)*sin(e + f*x)^4 + 15*B*cos(e + f*x)^4*sin(e + f*x)))/(30*f*cos(e
 + f*x)^6)